package com.rain.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.rain.activity.utils.BaseActivity;

public class SearchActivity extends BaseActivity {
    private Button searchBtn ;
    private EditText editText;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.page_search);
        super.init("搜索问题", 2);
        editText = (EditText) findViewById(R.id.input);
        searchBtn = (Button) findViewById(R.id.search_btn);
        searchBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String keyword = editText.getText().toString();
                Intent  in = new Intent(SearchActivity.this,QuestionActivity.class);
                in.putExtra("keyword",keyword);
                startActivity(in);
            }
        });
    }
}
